var
    log4jsConfig = require('./log4jsConfig.js'),
    express = require('express'),
    path = require('path'),
    cookieParser = require('cookie-parser'),
    bodyParser = require('body-parser'),
    restful = require("./pros_modules/restful"),
    app_resources = require('./appresources.js'),
    sessionConf = require('./session.conf.js'),
    mysql = require('./pros_modules/mysql'),
    multiparty = require('./pros_modules/multiparty'),
    app = express();
app.use(log4jsConfig);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'boot')));
app.use(express.static(path.join(__dirname, 'dojo')));
app.use(sessionConf.config());
app.use(restful);
app.use(multiparty);
app_resources(app);

module.exports = app;